
import 'package:fixnum/fixnum.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_deer/index/iview/betting_result_iview.dart';
import 'package:flutter_deer/index/iview/game_unstart_iview.dart';
import 'package:flutter_deer/index/models/football_ratio_entity.dart';
import 'package:flutter_deer/index/models/user_betting_entity.dart';
import 'package:flutter_deer/mvp/base_page_presenter.dart';
import 'package:flutter_deer/net/base_entity.dart';
import 'package:flutter_deer/net/dio_utils.dart';
import 'package:flutter_deer/net/http_api.dart';
import 'package:flutter_deer/util/other_utils.dart';


class BettingResultPagePresenter extends BasePagePresenter<BettingResultIMvpView> {

  @override
  void initState() {

  }

  Future<dynamic> getBettingDetail(String? id) async {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      asyncRequestNetwork<BaseEntity<UserBettingResultEntity>>(Method.get,
        url: HttpApi.bettingOrderDetail.replaceAll('{id}', id.nullSafe),
        onSuccess: (data) {
          view.setBettingResult(data!.data);
        },
        onError: (code,msg){

        }
      );
    });
  }

}